<template>
  <el-config-provider :locale="useAppStore().locale === 'zh' ? zhCn : en">
    <router-view />
  </el-config-provider>
</template>

<script setup lang="ts">
// import locale from 'element-plus/dist/locale/zh-cn.mjs'

import zhCn from 'element-plus/lib/locale/lang/zh-cn'
import en from 'element-plus/lib/locale/lang/en'
import { useAppStore } from '@/stores/modules/app' //store存放语言配置
const appStore = useAppStore()
console.log('useAppStore: ', appStore)
</script>
<style scoped></style>
